<?php
/*--------------------------------------------------------------
   drop_order_mail_columns.php 2023-07-07
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2023 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
 -------------------------------------------------------------*/

/** @var DatabaseModel $this */
/** @var int $t_success */

if ($this->table_column_exists('orders', 'gm_order_html')) {
    $query     = 'ALTER TABLE `orders` DROP COLUMN `gm_order_html`;';
    $t_success &= $this->query($query, true);
}

if ($this->table_column_exists('orders', 'gm_order_txt')) {
    $query     = 'ALTER TABLE `orders` DROP COLUMN `gm_order_txt`;';
    $t_success &= $this->query($query, true);
}